<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$return['params']=array('jy'=>1);
	set_html('title','我的养鸡日志');
	exi($return);
}
if($_RQ['op']=='list'){
	$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$total='';
	$list=pdo_getslice('jy_yangjidan_jilog',$params,array($pindex,$psize),$total,'','','id desc');
	if($list){
		foreach($list as &$item){
			$item['myjititle']=pdo_getcolumn('jy_yangjidan_myji',array('id'=>$item['jiid'],'uniacid'=>$_SESSION['uniacid']),'title')?:'';
			$item['typetitle']=$this->jilog_type[$item['type']]?:'';
			$jiesuanday=$item['createtime']+7*24*3600;
			$item['jiesuanday']=date('Y-m-d',$jiesuanday);
			$item['createtime']=date('Y-m-d H:i:s',$item['createtime']);
		}
	}
	$return['list']=$list;
	exi($return);
}
